package com.asion.qkan.ui.contract;

import com.asion.qkan.entry.CategoryEntry;
import com.asion.qkan.entry.RecommendEntry;
import com.asion.qkan.ui.model.BaseModel;
import com.asion.qkan.ui.presenter.BasePresenter;
import com.asion.qkan.ui.view.BaseView;

/**
 * Created by asion on 16-10-12.
 */

public interface FindContract {

    interface Model extends BaseModel {
        //定义model中的需要方法 以接口形式
        void getRecommedDatas(int tag,OnGetRecommends onGetRecommends,int type);

        void getAllDatas(int tag,OnAllDatas onAllDatas);

    }

    interface AllView extends BaseView<CategoryEntry>{

    }
    interface View extends BaseView<RecommendEntry> {
        //定义view中需要的接口
        //baseView<T> 可指定你要用的Entry返回数据
        void showDatas(RecommendEntry recommendEntry,int type);
    }
   interface OnGetRecommends{
       void OnRecommedSuccess(RecommendEntry recommendEntry,int type);
       void OnFailed(Throwable T);
   }

    interface  OnAllDatas{
        void OnAllDatasSuccess(CategoryEntry categoryEntry);
        void Failed(Throwable T);
    }
    abstract static class AllPresenter extends BasePresenter<AllView,Model>{
        public abstract void setAllCategoryDatas(int tag);
    }
    abstract static class Presenter extends BasePresenter<View,Model> {
        //定义presenter需要的方法
        public abstract void setRecommendDatas(int tag,int type);
    }

}
